ENV_CONFIG = "dev"
# ENV_CONFIG = "prod"
#ENV_CONFIG = "local"

if ENV_CONFIG == "prod":
    config = {
        "debug": False,
        "dev": False,
        # "debug": True,
        # "dev": True,
        "sql": "dm",
        # "sql": "mysql",
        # "sql": "sqlite3",
        "dmSql": {
            "engine": "django_dmPython",
            "host": "192.168.6.72",
            "port": "5236",
            "user": "ZXCPJF",
            "password": "ZXCPJF12345",
            "dbname": "ZXCPJF",
            'options': {
                'local_code': 1,
                'connection_timeout': 5,
            }

        },
        "mySql": {
            'engine': 'django.db.backends.mysql',
            "host": "127.0.0.1",
            "port": "3306",
            "user": "root",
            "password": "123456",
            "dbname": "soft",
            'options': {
                'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
                'charset': 'utf8mb4',
            }
        },
        # "dataDir": u"C:/360Downloads/ck/data/",
        # "dataDir": u"E:/data/",
        "ownIp": "192.168.6.70",
        "ownPort": "10009",
        "dataDir": "/data/",
        "dataDirBack": "/dataBack/",
        "tmpDir": u"tmp/",
        "default_log": "log/server.log",
        "user_log": "log/user.log",
        "request_log": "log/request.log",
        "nginx_error": "log/error.log",
        "nginx_access": "log/access.log",

        "FastDFS_config": "/home/ckgit/server/conf/client.conf",
        "isUseFastDFS": 1,
        "FastDFSIP": "192.168.6.70",
        "FastDFSPort": "8888",
        # 本地文件目录
        # "software": "/software/software/",
        "cover": "software/cover/",
        "file": "software/file/",
        "logo": "software/logo/",
        "material": "software/material/",
        "verification": "software/verification/",
        "questionAnswer": "software/questionAnswer/",
        "chunk": "software/chunk/",

        # user system
        "isUserSystem": 1,
        "userSystem": "http://192.168.6.77",
        "userPort": "8800",
        "userToken": "/auth/oauth/token",
        "userInfo": "/auth/token/checkToken",
        "userOut": "/auth/token/logout",
        "userCode": "/auth/user/getUserCodeList",
        "client_id": "jiaofuxitong2020",
        "client_secret": "123456",
        "response_type": "",
        "redirect_url": "http://192.168.6.70:10000/admin/",
        "de_redirect_url": "http://192.168.6.70:10000/develop/",
        "user_redirect_url": "http://192.168.6.70:10000/store/",
        "remoteIp": "http://192.168.6.70:10000/admin/",

        # serverContent
        "serverRegister": {
            "implementationType": "01",
            "interfaceContractList": [
                "s1.zxcpjf.jw"
            ],
            "keywordList": [
                "在线产品交付"
            ],
            "loadBalanceType": "01",
            "segmentID": "ZXCPJF1.0.0.0",
            "serviceCreatorInformation": "中科院空天信息创新研究院",
            "serviceDependencies": "",
            "serviceDescription": "在线产品交付",
            "serviceDeveloperInformation": "中科院空天信息创新研究院",
            "serviceHealthy": 1,
            "serviceHeartConfig": {
                "checkHeart": False,
                "lostTimeout": 600,
                "unregisterTimeout": 86400
            },
            "serviceInstanceList": [
                {
                    "instanceName": "instance01",
                    "ip": "192.168.6.70",
                    "portInfoList": [
                        {
                            "baseUrl": "/api/",
                            "originalPort": 10000,
                            "port": 10000,
                            "type": "http"
                        }
                    ]
                }
            ],
            "serviceName": "bs1.zxcpjf.bz01.jw",
            "serviceOpenness": "01",
            "serviceProviderInformation": "中科院空天信息创新研究院",
            "serviceStatus": "01",
            "serviceTitle": "在线产品交付",
            "serviceUpdateContent": "",
            "serviceUpdaterInformation": "中科院空天信息创新研究院"
        },

        "serverIP": "http://www.dirapi.lo",
        "serverPort": "80",
        "serverRegUrl": "/inner/serviceMetadata/register",
        "serverCheckUrl": "/inner/serviceMetadata/{}/isServiceNameUsed",
        "serverUpdateUrl": "/inner/serviceMetadata/update",
        "serverSearchUrl": "/inner/clientAddressing/interfaceContract/{}",
        "serviceDocker": "s1.placename.jw",

        # contain cloud
        "containerServerIP": "http://192.168.6.73",
        "containerServerPort": "11019",
        "containerServerListUrl": "/api/v1/package/post/packages",

        # server install
        "serverInstallIp": "http://192.168.161.10",
        "serverInstallPort": "6081",
        "serverPushUrl": "/deployment/segmentlib/pushSegsToSegmentLib"
    }
elif ENV_CONFIG == "dev":
    config = {
        # "debug": False,
        # "dev": False,
        "debug": True,
        "dev": True,
        "sql": "dm",
        # "sql": "mysql",
        # "sql": "sqlite3",
        "dmSql": {
            "engine": "django_dmPython",
            "host": "192.168.6.70",
            "port": "10002",
            "user": "SYSDBA",
            "password": "SYSDBA",
            "dbname": "DAMENG",
            'options': {
                'local_code': 1,
                'connection_timeout': 5,
            }

        },
        "mySql": {
            'engine': 'django.db.backends.mysql',
            "host": "127.0.0.1",
            "port": "3306",
            "user": "root",
            "password": "123456",
            "dbname": "soft",
            'options': {
                'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
                'charset': 'utf8mb4',
            }
        },
        # "dataDir": u"C:/360Downloads/ck/data/",
        # "dataDir": u"E:/data/",
        "ownIp": "192.168.6.70",
        "ownPort": "10008",
        "dataDir": "/data/",
        "dataDirBack": "/dataBack/",
        "tmpDir": u"tmp/",
        "default_log": "log/server.log",
        "user_log": "log/user.log",
        "request_log": "log/request.log",
        "nginx_error": "log/error.log",
        "nginx_access": "log/access.log",

        "FastDFS_config": "/home/ckgit/server/conf/client.conf",
        "isUseFastDFS": 1,
        "FastDFSIP": "192.168.6.70",
        "FastDFSPort": "8888",

        # 本地文件目录
        # "software": "/software/software/",
        "cover": "software/cover/",
        "file": "software/file/",
        "logo": "software/logo/",
        "material": "software/material/",
        "verification": "software/verification/",
        "questionAnswer": "software/questionAnswer/",
        "chunk": "software/chunk/",

        # user system
        "isUserSystem": 0,
        "userSystem": "http://192.168.6.77",
        "userPort": "8800",
        "userToken": "/auth/oauth/token",
        "userInfo": "/auth/token/checkToken",
        "userOut": "/auth/token/logout",
        "userCode": "/auth/user/getUserCodeList",
        "client_id": "zxcpjftest",
        "client_secret": "123456",
        "response_type": "",
        "redirect_url": "http://192.168.160.129:80/admin/",
        "de_redirect_url": "http://192.168.160.129:80/develop/",
        "user_redirect_url": "http://192.168.160.129:80/store/",
        "remoteIp": "http://192.168.6.70:10000/admin/",

        # serverContent
        "serverRegister": {
            "implementationType": "01",
            "interfaceContractList": [
                "s1.zxcpjf.jw"
            ],
            "keywordList": [
                "在线产品交付"
            ],
            "loadBalanceType": "01",
            "segmentID": "ZXCPJF1.0.0.0",
            "serviceCreatorInformation": "中科院空天信息创新研究院",
            "serviceDependencies": "",
            "serviceDescription": "在线产品交付",
            "serviceDeveloperInformation": "中科院空天信息创新研究院",
            "serviceHealthy": 1,
            "serviceHeartConfig": {
                "checkHeart": False,
                "lostTimeout": 600,
                "unregisterTimeout": 86400
            },
            "serviceInstanceList": [
                {
                    "instanceName": "instance01",
                    "ip": "192.168.6.70",
                    "portInfoList": [
                        {
                            "baseUrl": "/api/",
                            "originalPort": 10000,
                            "port": 10000,
                            "type": "http"
                        }
                    ]
                }
            ],
            "serviceName": "bs1.zxcpjf.bz01.jw",
            "serviceOpenness": "01",
            "serviceProviderInformation": "中科院空天信息创新研究院",
            "serviceStatus": "01",
            "serviceTitle": "在线产品交付",
            "serviceUpdateContent": "",
            "serviceUpdaterInformation": "中科院空天信息创新研究院"
        },
        "serverIP": "http://www.dirapi.lo",
        "serverPort": "80",
        "serverRegUrl": "/inner/serviceMetadata/register",
        "serverCheckUrl": "/inner/serviceMetadata/{}/isServiceNameUsed",
        "serverUpdateUrl": "/inner/serviceMetadata/update",
        "serverSearchUrl": "/inner/clientAddressing/interfaceContract/{}",
        "serviceDocker": "s1.placename.jw",

        "containerServerIP": "http://192.168.6.73",
        "containerServerPort": "11019",
        "containerServerListUrl": "/api/v1/package/post/packages",

        # server install
        "serverInstallIp": "http://192.168.161.10",
        "serverInstallPort": "6081",
        "serverPushUrl": "/deployment/segmentlib/pushSegsToSegmentLib"
    }
else:
    config = {
        # "debug": False,
        # "dev": False,
        "debug": True,
        "dev": True,
        # "sql": "dm",
        # "sql": "mysql",
        "sql": "sqlite3",
        "dmSql": {
            "engine": "django_dmPython",
            "host": "192.168.6.70",
            "port": "10002",
            "user": "SYSDBA",
            "password": "SYSDBA",
            "dbname": "DAMENG",
            'options': {
                'local_code': 1,
                'connection_timeout': 5,
            }

        },
        "mySql": {
            'engine': 'django.db.backends.mysql',
            "host": "127.0.0.1",
            "port": "3306",
            "user": "root",
            "password": "123456",
            "dbname": "soft",
            'options': {
                'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
                'charset': 'utf8mb4',
            }
        },
        "dataDir": "C:\\Users\\魏谢哥\\Desktop\\智慧计算\\data",
        # "dataDir": u"E:/data/",
        "ownIp": "192.168.6.70",
        "ownPort": "10006",
        # "dataDir": "/data/",
        "dataDirBack": "/dataBack/",
        "tmpDir": u"tmp/",
        "default_log": "log/server.log",
        "user_log": "log/user.log",
        "request_log": "log/request.log",
        "nginx_error": "log/error.log",
        "nginx_access": "log/access.log",

        # FDFS
        "FastDFS_config": "E:\\code\\ckgit\\server\\conf\\client.conf",
        "isUseFastDFS": 0,
        "FastDFSIP": "192.168.6.78",
        "FastDFSPort": "8888",
        # 本地文件目录
        # "software": "/software/software/",
        "cover": "software/cover/",
        "file": "software/file/",
        "logo": "software/logo/",
        "material": "software/material/",
        "verification": "software/verification/",
        "questionAnswer": "software/questionAnswer/",
        "chunk": "software/chunk/",

        # user system
        "isUserSystem": 0,
        "userSystem": "http://192.168.6.77",
        "userPort": "8800",
        "userToken": "/auth/oauth/token",
        "userInfo": "/auth/token/checkToken",
        "userOut": "/auth/token/logout",
        "userCode": "/auth/user/getUserCodeList",
        "client_id": "jiaofuxitong2020",
        "client_secret": "123456",
        "response_type": "",
        "redirect_url": "http://192.168.160.129:80/admin/",
        "de_redirect_url": "http://192.168.160.129:80/develop/",
        "user_redirect_url": "http://192.168.160.129:80/store/",
        "remoteIp": "http://192.168.6.70:10000/admin/",

        # serverContent
        "serverRegister": {
            "implementationType": "01",
            "interfaceContractList": [
                "s1.zxcpjf.jw"
            ],
            "keywordList": [
                "在线产品交付"
            ],
            "loadBalanceType": "01",
            "segmentID": "ZXCPJF1.0.0.0",
            "serviceCreatorInformation": "中科院空天信息创新研究院",
            "serviceDependencies": "",
            "serviceDescription": "在线产品交付",
            "serviceDeveloperInformation": "中科院空天信息创新研究院",
            "serviceHealthy": 1,
            "serviceHeartConfig": {
                "checkHeart": False,
                "lostTimeout": 600,
                "unregisterTimeout": 86400
            },
            "serviceInstanceList": [
                {
                    "instanceName": "instance01",
                    "ip": "192.168.6.70",
                    "portInfoList": [
                        {
                            "baseUrl": "/api/",
                            "originalPort": 10000,
                            "port": 10000,
                            "type": "http"
                        }
                    ]
                }
            ],
            "serviceName": "bs1.zxcpjf.bz01.jw",
            "serviceOpenness": "01",
            "serviceProviderInformation": "中科院空天信息创新研究院",
            "serviceStatus": "01",
            "serviceTitle": "在线产品交付",
            "serviceUpdateContent": "",
            "serviceUpdaterInformation": "中科院空天信息创新研究院"
        },
        "serverIP": "http://www.dirapi.lo",
        "serverPort": "80",
        "serverRegUrl": "/inner/serviceMetadata/register",
        "serverCheckUrl": "/inner/serviceMetadata/{}/isServiceNameUsed",
        "serverUpdateUrl": "/inner/serviceMetadata/update",
        "serverSearchUrl": "/inner/clientAddressing/interfaceContract/{}",
        "serviceDocker": "s1.placename.jw",

        "containerServerIP": "http://192.168.6.73",
        "containerServerPort": "11019",
        "containerServerListUrl": "/api/v1/package/post/packages",

        # server install
        "serverInstallIp": "http://192.168.3.195",
        "serverInstallPort": "6081",
        "serverPushUrl": "/deployment/segmentlib/pushSegsToSegmentLib"
    }
